﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// School Repository. Good example of CRUD operations.
    ///// </summary>
    public class SchoolRepository : ISchoolRepository
    {
        private static readonly ISchoolDao _school = DataAccess.SchoolDao;
        public List<School> GetList()
        {
            return _school.GetSchool().ToList();
        }

        public School Get(string id)
        {
            return _school.GetSchoolByID(id);
        }

        public void Insert(School t)
        {
            _school.InsertSchool(t);
        }

        public void Update(School t)
        {
            _school.UpdateSchool(t);
        }

        public void Delete(School t)
        {
            _school.DeleteSchool(t);
        }
    }
}